import type { AppRouteModule } from '/@/router/types';
import { LAYOUT } from '/@/router/constant';
import { RoleEnum } from '/@/enums/roleEnum';

const permission: AppRouteModule = {
  path: '/face-recognition',
  name: 'FaceRecognition',
  component: LAYOUT,
  meta: {
    orderNo: 10000,
    icon: 'ion:build-outline',
    title: '人脸识别系统',
  },
  children: [
    {
      path: 'teacherDuty',
      name: 'TeacherDuty',
      meta: {
        icon: 'ion:color-palette-outline',
        title: '教师值班管理',
        roles: [RoleEnum.Admin],
      },
      component: () => import('/@/views/face-recognition/teacherDuty/index'),
    },
    {
      path: 'studentInfo',
      name: 'StudentInfo',
      meta: {
        icon: 'ion:school-outline',
        title: '学生信息',
        roles: [RoleEnum.Admin],
      },
      component: () => import('/@/views/face-recognition/studentInfo/index'),
    },
    {
      path: 'studyRoom',
      name: 'StudyRoom',
      component: () => import('/@/views/face-recognition/studyRoom/index'),
      meta: {
        icon: 'ion:library-outline',
        title: '自习室管理',
        orderNo: 30,
        roles: [RoleEnum.Admin],
      },
    },
    {
      path: 'notice',
      name: 'Notice',
      component: () => import('/@/views/face-recognition/notice/index'),
      meta: {
        icon: 'ion:notifications-outline',
        title: '公告管理',
        orderNo: 30,
        roles: [RoleEnum.Admin],
      },
    },
    {
      path: 'reserveSeat',
      name: 'ReserveSeat',
      component: () => import('/@/views/face-recognition/reserveSeat/index'),
      meta: {
        icon: 'ion:book-outline',
        title: '预约座位',
        orderNo: 30,
        roles: [RoleEnum.Student],
      },
    },
    {
      path: 'violation',
      name: 'Violation',
      component: () => import('/@/views/face-recognition/violation/index'),
      meta: {
        icon: 'ion:barcode-outline',
        title: '违规记录',
        orderNo: 30,
      },
    },
  ],
};

export default permission;
